﻿@model IEnumerable<DMHelper.Models.DDSheet>
           
@{
    ViewBag.Title = "Infos de combat";
}

<h2 style="text-align:center;">Ordre des joueurs</h2>
@using (Html.BeginForm())
{
<table style="text-align:center;">
    <tr>
    <td style="font-weight:bold;color:Black;text-decoration:underline;">Nom</td>
    <td style="font-weight:bold;color:Black;text-decoration:underline;">Initiative</td>
    <td style="font-weight:bold;color:Black;text-decoration:underline;">Nouvelle initiative</td>
    <td style="font-weight:bold;color:Black;text-decoration:underline;">Supprimer de l'initiative</td>
    </tr>
        @foreach (var item in DMHelper.Models.OrdreInitiative.liste())
        {
        <tr>
            <td>@item.Value.getName()</td>
            <td>@item.Value.getIni()</td>
            <td><input name="nouvelleIni" type="text"/></td>
            <td><input id="@item.Key" name="btnSubmit" type="submit" value="Supprimer @(item.Key)"/></td>
        </tr>
        }
    <tr>
        <td><input name="name" type="text"/></td>
        <td><input name="ini" type="text"/></td>
        <td><input id="nouveau" name="btnSubmit" type="submit" value="Nouvelle entrée"/></td>
    </tr>
</table>
<br />
<input id="modifier" name="btnSubmit" type="submit" value="Modifier l'initiative"/>
<input id="terminer" name="btnSubmit" type="submit" value="Terminer le combat"/>
}


<h2 style="text-align:center;">Informations sur les joueurs</h2>

<table style="text-align:center;">
    <tr>
        <td style="font-weight:bold">Nom</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.head.PlayerName.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">AC</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.ac.TotalAC.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">AC Flat-Footed</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.ac.FlatFootAC.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">AC Touch</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.ac.TouchAC.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Initiative Modifier</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.stats.baseInitative.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Fortitude</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.savingThrows.ability("For").TotalSave.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Reflex</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.savingThrows.ability("Ref").TotalSave.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Will</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.savingThrows.ability("Wil").TotalSave.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Passive - Spot</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.skills.Skill("Spot").totalSkill.Value)</td>
        }
    </tr>
    <tr>
        <td style="font-weight:bold">Passive - Listen</td>
        @foreach (var item in Model)
        {
            <td>@Html.DisplayFor(modelItem => item.skills.Skill("Listen").totalSkill.Value)</td>
        }
    </tr>
</table>
